/* This is the driver program for Lab 7 Part II.
 * This is a reasonably good test of the calculateSJFAverage() and calculateFIFOAverage() 
 * of the ServerSimulation class. This should show that SJF scheduling by Web servers 
 * using priority queues (Heaps) produces a better average service time than traditional 
 * queue-based FIFO scheduling. 
 * 
 * Name:
 * Andrew ID:
 * Date:
 * */

public class Driver {

	public static void main(String[] args){
		int kiloByteRate = 100;     // The data rate in KiloBytes per second
		int numJobsPerBatch = 50; // number of jobs per session
		int numBatches = 10;        // number of sessions

		for (int i = 1; i <= numBatches; i++)
		{
			System.out.println("Processing Batch # " + i + "...");
			ServerSimulation newServer = new ServerSimulation(numJobsPerBatch, kiloByteRate);
			System.out.println("The average FIFO time is " + newServer.calculateFIFOAverage() + " seconds");
			System.out.println("The average SJF time is " + newServer.calculateSJFAverage() + " seconds");
			System.out.println();
		}
   


   }
}